def is_regular_nonterminal(ch):
    if len(ch) == 1 and ((ch.isalpha() and ch.upper() == ch)):
        return True
    for c in ch:
        if ord(c) >= ord('0') and ord(c) <= ord('9'):
            return False
    if len(ch) > 1 and ch == ch.lower():
        return True
    return False


def is_regular_terminal(ch):
    if len(ch) == 1 and not is_regular_nonterminal(ch):
        return True
    return False